package com.itheima.shop.state;

import com.itheima.shop.domain.Order;
import org.springframework.stereotype.Component;

/**
 * @program: design
 * @description:
 * @author: zhanghz001
 * @create: 2020-12-15 15:26
 **/
@Component("sendMsgBehavior")
public class SendMsgBehavior implements State {
    @Override
    public void doAction(Order order) {
        System.out.println("下单成功");
        order.setState(this);
    }
    
    @Override
    public void execute() {
        System.out.println("扣款,需要通知商家发货！");
        System.out.println("扣库存");
    }
}
